home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
001a
/
tlxjwpc5.zip
/
CAP.SLT
next >
Wrap
Text File
|
1990-09-21
|
5KB
|
109 lines
//╔═════════════════════════════════════════════════════════════════════╗
//║ RBBS 17.3A JW-PC Consulting DataFlex.HST (608)837-1923 ║
//║ Dual Std HST/V.32/MNP5/V.42 RBBSnet 8:972/2 FIDOnet 1:121/8 ║
//╚═════════════════════════════════════════════════════════════════════╝
// Telix 3.XX script to either automatically open or to query the
// user about opening a capture file.
//
// JW> This useful Telix script was captured from the Telix Echo
// JW> and reformatted in order to compile by Jim Wargula of Sun Prairie, WI.
// JW> (JW-PC Consulting - BBS (608)837-1923).
//
// The capture file name is first six valid DOS filename characters
// from the _entry_name to which you are connected, followed by two
// digit day-of-the-month. This ensures that a uniquely named capture
// file will be created, and enables the user to track the files.
// Provisions are made to specify a full path for the capture file,
// such as "c:\telix\cap\" or whatever. Telix always puts the
// capture file in the default directory, and this feature permits
// the user to decide regarding the capture directory. Be sure to
// include the trailing back-slash when specifying the capture directory!
// If you want to use default directory for your captures, set cap_dir
// equal to "" (that's quote quote).
//
// JW> Script modification note was added to place full date stamp into
// JW> Capture file name in lieu of Phone Directory characters plus day number.
// JW> This is more useful in many cases. JW-PC Consulting
//
// If you ALWAYS want a capture file opened, change auto_cap to "y"
// instead of "n". The script will develop the capture file name,
// and open it for you. If you leave it as "n", the script will ask
// you if you want a capture opened, and will act accordingly.
//
// This script was designed to be called by a logon script, or to
// have this script call a logon script. Alternately, you can leave
// auto_cap as "y" and run the script via function key whenever you
// want a capture file created.
//
// Developed by Jim Hanoian on 06JUL89
// 11502 Roslyn Road
// Fredericksburg, VA 22401
// 703-786-9253
//
// If you like and use this script, it would sure make my day if you
// mailed me a dollar bill.
//
// Telix Echo at Thunderbolt BBS (1:265/13) phone (703)-373-9289.
//
// I will not be held liable for anything that this code does.
//
main() { if (capture_stat() != 0) //If we have a capture file
{ //already open or paused,
capture("*CLOSE*"); //close it.
}
str cap_dir[64]="c:\com\tlx\"; //Put your capture path here
str auto_cap[]="n"; //Change to "Y" for no-ask...
str message[80]; str s[1];
str cap_name[12];
str dat[8];
str day[2];
int save;
int key;
int i;
if (auto_cap != "Y" && auto_cap != "y") //If auto_cap is NOT yes, ask...
{
save=vsavearea(10,10,66,13); //Save the screen...
box(10,10,66,13,2,0,31); //Draw box, ask the question...
pstraxy("If you want to create a capture file, enter 'Y'",15,11,30);
pstraxy("otherwise, press any key to continue... ",20,12,30);
key=inkeyw(); //Process the response
vrstrarea(save); //Restore the screen...
}
if (auto_cap == "Y" || auto_cap == "y" || key == 89 || key == 121)
{ //if we have auto-yes, or response-yes
while (((strlen(_entry_name) > i)!=0) and ((strlen(cap_name) < 6)!=0))
{ //Parse _entry_name until we hit max
if ((isalnum (subchr(_entry_name,i)) != 0))
{ //Build cap_name with "valid"
substr(_entry_name,i,1,s); //chars from _entry_name
strcat(cap_name,s); //one char at a time
}
i=i+1;
}
date(curtime(),dat); //Get the string date
// JW> Comment out the next two lines if full date stamp is desired
substr(dat,3,2,day); //Just want the day
strcat(cap_name,day); //Add day to cap_name
// JW> Uncomment the following line if full date stamp is desired
// strcat(cap_name,dat); //Add date to cap_name
strcat(cap_name,".CAP"); //Add ext to cap_name
strcat(cap_dir,cap_name); //Put path in front of cap_name
strupper(cap_dir); //Make it all caps
if (capture(cap_dir) == -1) //Try to open capture file,
{ //if error, construct message...
strcat(message,"ERROR in opening ");
strcat(message,cap_dir);
strcat(message," capture file.");
}
else
{ //if OK, construct message...
strcat(message,"Capture file ");
strcat(message,cap_dir);
strcat(message," successfully opened.");
}
}
else
{ //If not wanted, construct message
strcat(message,"At your request, capture file was not opened.");
}}